Inheritance: extends Illuminate\Database\Eloquent\Model, implements Illuminate\Contracts\Auth\Authenticatable, implements Illuminate\Contracts\Auth\CanResetPassword, use trait Illuminate\Auth\Authenticatable, use trait Illuminate\Auth\Passwords\CanResetPassword, use trait Devise\Support\Sortable\Sortable, use trait Illuminate\Database\Eloquent\SoftDeletes
Example #1
0
 /**
  * Removes users which have been awaiting activation (after
  * registering). Currently, default is 30 days outstanding
  *
  * @return Boolean
  */
 public function removeUnactivatedUsers($daysOutstanding = 30)
 {
     $outstandingDate = date("Y-m-d H:i:s", strtotime('now -' . $daysOutstanding . ' days'));
     if ($this->DvsUser->where('activated', '=', false)->where('created_at', '<=', $outstandingDate)->forceDelete()) {
         return true;
     }
     return false;
 }
Example #2
0
 /**
  * Finds an instance of DvsUser using the
  * specified fieldname and value
  *
  * @param  string  $fieldname
  * @param  string  $value
  * @return DvsUser
  */
 protected function findByFieldAndValue($fieldname, $value)
 {
     return $this->DvsUser->with('groups')->where($fieldname, '=', $value)->first();
 }
Example #3
0
<h3>Mixed Groups</h3>

<!-- field -->
<p data-devise="groupField, text, Text, Mixed Group"></p>

<!-- collection -->
<p data-devise="groupCol[key1], text, Text, Collection Name Inside Group, Mixed Group"></p>
<p data-devise="groupCol[key2], datetime, Datetime, Collection Name Inside Group, Mixed Group"></p>

<!-- model -->
<?php 
$user = DvsUser::find(1);
?>
<p data-devise="$user, User $user->id, Mixed Group"></p>

<!-- model attribute -->
<p data-devise="$user->email, User $user->id Email, Mixed Group"></p>

<pre class="devise-code-snippet"><code class="html">
<?php 
echo htmlentities('
<!-- field -->
<p data-devise="groupField, text, Text, Mixed Group"></p>

<!-- collection -->
<p data-devise="groupCol[key1], text, Text, Mixed Group"></p>
<p data-devise="groupCol[key2], datetime, Datetime, Mixed Group"></p>

<!-- model -->
<?php $user = DvsUser::find(1); ?>
<p data-devise="$user, User $user->id, Mixed Group"></p>