Open Casperhr opened 8 years ago
This is useful when migrating etc
from nstack
/* |-------------------------------------------------------------------------- | Mutators |-------------------------------------------------------------------------- */ /** * Automatically hash passwords (if enabled). * * @author Morten Rugaard <moru@nodes.dk> * @param string $value * @return \NStack\Models\BackendUsers\BackendUser */ public function setPasswordAttribute($value) { $this->attributes['password'] = (!$this->hashPassword) ? $value : Hash::make($value); return $this; } /* |-------------------------------------------------------------------------- | Migration |-------------------------------------------------------------------------- */ /** * Disable auto password hashing. * * @author Morten Rugaard <moru@nodes.dk> * @param bool $state * @return \NStack\Models\BackendUsers\BackendUser */ public function disablePasswordHashing($state = true) { $this->hashPassword = $state ? false : true; return $this; }
This is useful when migrating etc
from nstack