()
| 140 | } |
| 141 | |
| 142 | func (u *User) HasPassword() bool { |
| 143 | var pwd string |
| 144 | |
| 145 | if u.EncryptedPassword != nil { |
| 146 | pwd = *u.EncryptedPassword |
| 147 | } |
| 148 | |
| 149 | return pwd != "" |
| 150 | } |
| 151 | |
| 152 | // BeforeSave is invoked before the user is saved to the database |
| 153 | func (u *User) BeforeSave(tx *pop.Connection) error { |
no outgoing calls