add notify_email to accounts table and getUserNotifyEmail() method in user class

This commit is contained in:
xisi 2014-01-17 15:35:15 -05:00
parent 9ecd8d4d3e
commit 13e6c43ba5
3 changed files with 5 additions and 0 deletions

View File

@ -25,6 +25,9 @@ class User extends Base {
public function getUserEmail($username, $lower=false) {
return $this->getSingle($username, 'email', 'username', 's', $lower);
}
public function getUserNotifyEmail($username, $lower=false) {
return $this->getSingle($username, 'notify_email', 'username', 's', $lower);
}
public function getUserNoFee($id) {
return $this->getSingle($id, 'no_fees', 'id');
}

View File

@ -15,6 +15,7 @@ CREATE TABLE IF NOT EXISTS `accounts` (
`username` varchar(40) NOT NULL,
`pass` varchar(255) NOT NULL,
`email` varchar(255) DEFAULT NULL COMMENT 'Assocaited email: used for validating users, and re-setting passwords',
`notify_email` VARCHAR( 255 ) NULL DEFAULT NULL,
`loggedIp` varchar(255) DEFAULT NULL,
`is_locked` tinyint(1) NOT NULL DEFAULT '0',
`failed_logins` int(5) unsigned DEFAULT '0',

View File

@ -1,2 +1,3 @@
ALTER TABLE `accounts` ADD COLUMN `signup_timestamp` INT( 10 ) NOT NULL DEFAULT '0' AFTER `failed_pins`;
ALTER TABLE `accounts` ADD `notify_email` VARCHAR( 255 ) NULL DEFAULT NULL AFTER `email` ;
INSERT INTO `settings` (`name`, `value`) VALUES ('DB_VERSION', '0.0.4') ON DUPLICATE KEY UPDATE `value` = '0.0.4';