Compare commits
4 Commits
2238fc39af
...
98a0c5472d
Author | SHA1 | Date |
---|---|---|
Alfonso Saavedra "Son Link" | 98a0c5472d | |
Alfonso Saavedra "Son Link" | 3167b76055 | |
Alfonso Saavedra "Son Link" | 788e2ff06c | |
Alfonso Saavedra "Son Link" | 0b7be053a4 |
|
@ -93,7 +93,7 @@ class Dashboard extends BaseController
|
||||||
$userData = $this->usersModel->getUser($this->session->username);
|
$userData = $this->usersModel->getUser($this->session->username);
|
||||||
$avatar = FCPATH . '/img/users/'. $userData->img;
|
$avatar = FCPATH . '/img/users/'. $userData->img;
|
||||||
$oldAvatarFile = new \CodeIgniter\Files\File($avatar);
|
$oldAvatarFile = new \CodeIgniter\Files\File($avatar);
|
||||||
if ($oldAvatarFile->getExtension() != $ext) unlink($avatar);
|
if ($oldAvatarFile->getExtension() != $ext && file_exists($avatar)) unlink($avatar);
|
||||||
|
|
||||||
$filename = "{$this->session->username}.$ext";
|
$filename = "{$this->session->username}.$ext";
|
||||||
$move = $file->move(FCPATH . '/img/users/', $filename, true);
|
$move = $file->move(FCPATH . '/img/users/', $filename, true);
|
||||||
|
|
|
@ -12,14 +12,4 @@ class BaseModel extends Model
|
||||||
protected $validationRules = [];
|
protected $validationRules = [];
|
||||||
protected $validationMessages = [];
|
protected $validationMessages = [];
|
||||||
protected $skipValidation = false;
|
protected $skipValidation = false;
|
||||||
|
|
||||||
public function data($id)
|
|
||||||
{
|
|
||||||
$builder = $this->builder();
|
|
||||||
$builder->where('id', $id);
|
|
||||||
|
|
||||||
$query = $builder->get(1);
|
|
||||||
|
|
||||||
if ($query) return $query->getRow();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -262,7 +262,7 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="register-right">
|
<div class="register-right">
|
||||||
<input type="submit" value="Register" class="primary" />
|
<input type="submit" value="Update" class="primary" />
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
|
@ -278,7 +278,7 @@
|
||||||
<input type="password" name="passwordcheck" id="passwordcheck" required />
|
<input type="password" name="passwordcheck" id="passwordcheck" required />
|
||||||
<span class="input-error" id="passwd-error">Passwords don't match</span>
|
<span class="input-error" id="passwd-error">Passwords don't match</span>
|
||||||
<div class="register-right">
|
<div class="register-right">
|
||||||
<input type="submit" value="Register" class="primary" />
|
<input type="submit" value="Change" class="primary" />
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -25,10 +25,11 @@
|
||||||
<span class="input-error">Email address isn't valid</span>
|
<span class="input-error">Email address isn't valid</span>
|
||||||
|
|
||||||
<label>Password:</label>
|
<label>Password:</label>
|
||||||
<input type="password" name="password" id="password" required />
|
<input type="password" name="password" id="password" pattern="[0-9a-zA-Z_\-\|@\#~\$%\(\)=\^\*\+\[\]\{\}]{6,16}" required />
|
||||||
|
<span class="input-error">The password must be between 6 and 16 characters long. Only letters, numbers and the following special characters are allowed: |@#~~$%()=^*+[]{}-_</span>
|
||||||
|
|
||||||
<label>Repeat password:</label>
|
<label>Repeat password:</label>
|
||||||
<input type="password" name="passwordcheck" id="passwordcheck" required />
|
<input type="password" name="passwordcheck" id="passwordcheck" pattern="[0-9a-zA-Z_\-\|\@\#\~\$\%\(\)=\^\*\+\[\]\{\}]{6,16}" required />
|
||||||
<span class="input-error" id="passwd-error">Passwords don't match</span>
|
<span class="input-error" id="passwd-error">Passwords don't match</span>
|
||||||
|
|
||||||
<div class="nation-sel">
|
<div class="nation-sel">
|
||||||
|
|
Loading…
Reference in New Issue