Compare commits
No commits in common. "98a0c5472d3abe24d17c39097f8e6b4d6e7cc2a3" and "2238fc39af564d03d677e6bbf68c7262d4a2705d" have entirely different histories.
98a0c5472d
...
2238fc39af
|
@ -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 && file_exists($avatar)) unlink($avatar);
|
if ($oldAvatarFile->getExtension() != $ext) 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,4 +12,14 @@ 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="Update" class="primary" />
|
<input type="submit" value="Register" 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="Change" class="primary" />
|
<input type="submit" value="Register" class="primary" />
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -25,11 +25,10 @@
|
||||||
<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" pattern="[0-9a-zA-Z_\-\|@\#~\$%\(\)=\^\*\+\[\]\{\}]{6,16}" required />
|
<input type="password" name="password" id="password" 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" pattern="[0-9a-zA-Z_\-\|\@\#\~\$\%\(\)=\^\*\+\[\]\{\}]{6,16}" 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="nation-sel">
|
<div class="nation-sel">
|
||||||
|
|
Loading…
Reference in New Issue