A 22-year-old man has been sentenced to a year in prison for stealing the identities and passwords of more than 700 fellow students at his San Diego-area university so he could rig a campus election.

The U.S. attorney's office said Monday that former Cal State San Marcos student Matthew Weaver rigged the election so he could become student body president. He was one of two candidates for the position.

Weaver, of Huntington Beach, pleaded guilty in March to wire fraud, unauthorized access of a computer and identity theft.

He admits that he used small electronic devices that record a computer user's keystrokes to steal 745 passwords.

Weaver says he used those stolen identities to cast about 630 votes for himself and for friends who also were on the ballot.